#include <stdio.h>

int main() {
	int a, b, c;
	scanf ( "%d", &a);
	b = 1, c = 1;
	do
		b = b * c, c++;
	while (c <= a);
	printf ("%d", b);
}
